
//中山通
$("#editzhongshantongType").change(function (){
    var reslist=$("#editzhongshantongType").select2("data");
    $("#editzhongshantongTypes").val(payTypes(reslist));
});


$("#zhongshantongType").change(function(){
    var reslist=$("#zhongshantongType").select2("data");
    $("#zhongshantongTypes").val(payTypes(reslist));
});



function editzhongshantong(i) {

    $("#editzhongshantongKey").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.secretkey");
    $("#editzhongshantongMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.merchantID");
    $("#editzhongshantongWxSubMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.wxSubMchId");
    $("#editzhongshantongAlipaySubMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.aliSubMchId");
    $("#editzhongshantongStoreID").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.storeID");
    $("#editzhongshantongCallBackurl").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.callBack");

    $("#editzhongshantongTypes").attr("name", "payCompanyInfos[" + i + "].payType");
    $("#editzhongshantongRemark").attr("name","payCompanyInfos["+i+"].remark");

    $("#editzhongshantongType").attr("data-placeholder", "请从列表选择一项");
    $("#editzhongshantongType").attr("required", "");

}

function zhongshantong(i) {
    //console.log(1234)
    $("#zhongshantongKey").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.secretkey");
    $("#zhongshantongMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.merchantID");
    $("#zhongshantongWxSubMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.wxSubMchId");
    $("#zhongshantongAlipaySubMchId").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.aliSubMchId");
    $("#zhongshantongStoreID").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.storeID");
    $("#zhongshantongCallBackurl").attr("name", "payCompanyInfos[" + i + "].zhongShanTongVO.callBack");


    $("#zhongshantongRemark").attr("name","payCompanyInfos["+i+"].remark");
    $("#zhongshantongTypes").attr("name", "payCompanyInfos[" + i + "].payType");

    $("#zhongshantongPayType").attr("data-placeholder", "请从列表选择一项");
    $("#zhongshantongPayType").attr("required", "");


}